﻿namespace Vestras.StarCraft2.Luna.Parser.Ast {
    public sealed class ValueExpression : Expression {
        public Expression Value { get; internal set; }
        public Expression ChildExpression { get; internal set; } // Only has a value if Type == ValueExpression.Type.FunctionAccess or if Type == ValueExpression.Type.ExpressionEncapsulation
        public ExpressionType Type { get; internal set; }

        public enum ExpressionType {
            OctLiteral,
            HexLiteral,
            DecLiteral,
            StringLiteral,
            FloatLiteral,
            MemberAccess,
            ExpressionEncapsulation
        }

        public override string ToString() {
            return GetType().Name + " Value = [ " + Value + " ], ChildExpression = [ " + ChildExpression + " ], Type = [ " + Type + " ]";
        }
    }
}
